=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/plugin/oxmisc2.c,v retrieving revision 1.25 retrieving revision 1.28 diff -u -p -r1.25 -r1.28 --- OpenXM/src/kan96xx/plugin/oxmisc2.c 2005/06/16 05:07:24 1.25 +++ OpenXM/src/kan96xx/plugin/oxmisc2.c 2020/10/06 11:33:47 1.28 @@ -1,5 +1,7 @@ -/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc2.c,v 1.24 2004/09/17 08:46:10 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc2.c,v 1.27 2013/11/06 06:23:24 takayama Exp $ */ #include +#include +#include #include "ox_kan.h" #include "oxmisc2.h" /* This file requires sm1 object description. */ #include "cmo.h" @@ -383,7 +385,7 @@ struct object KoxIsThereErrorClient(struct object ob) int oxClientToObject(oxclientp client,struct object rob) { struct object ob = OINIT; - if (client == NULL) return; + if (client == NULL) return 0; /* rob = newObjectArray(N_OF_CLIENT_FIELDS); */ if (rob.tag != Sarray) { errorOxmisc2("oxClientToObject(): the second argument must be an array."); @@ -657,7 +659,7 @@ struct object KoxWatch(struct object client,struct obj }else{ WatchStream = 0; } - return; + return rob; } if (cc1 == NULL) { cc1 = (oxclientp) mymalloc(sizeof(oxclient)); @@ -759,11 +761,11 @@ struct object KoxCloseClient(struct object client) { switch (cc1->type) { case CLIENT_SOCKET: fp2fclose(cc1->datafp2); - close(cc1->controlfd); + {int r; r=close(cc1->controlfd);} break; case CLIENT_FILE: fp2fclose(cc1->datafp2); - close(cc1->controlfd); + {int r; r=close(cc1->controlfd);} break; default: errorOxmisc2("Unknown client->type\n"); @@ -1101,10 +1103,11 @@ int KgetCmoTagOfObject(struct object obj) { return(k); } -errorOxmisc2(char *s) { +int errorOxmisc2(char *s) { SET_MYERROROUT; fprintf(MyErrorOut,"error in oxmisc2.c: %s\n",s); errorKan1("%s\n"," "); + return 0; } struct object KoxPushCMD(struct object client,struct object cmd) { @@ -1258,10 +1261,10 @@ oxclientp oxCreateControl_RFC_101(int fdstream,int por /* Authentication by password. */ m = strlen(pass); s = (char *)mymalloc(sizeof(char)*(m+1)); - read(fdStream,s,m+1); s[m] = '\0'; + {int r; r=read(fdStream,s,m+1);} s[m] = '\0'; if (strcmp(s,pass) != 0) { fprintf(stderr,"oxCreateControl_RFC_101(): password authentication failed for control channel.\n"); - close(fdStream); + {int r; r=close(fdStream);} return(NULL); }