[BACK]Return to oxmisc2.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / plugin

Diff for /OpenXM/src/kan96xx/plugin/oxmisc2.c between version 1.25 and 1.28

version 1.25, 2005/06/16 05:07:24 version 1.28, 2020/10/06 11:33:47
Line 1 
Line 1 
 /* $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 <stdio.h>  #include <stdio.h>
   #include <string.h>
   #include <unistd.h>
 #include "ox_kan.h"  #include "ox_kan.h"
 #include "oxmisc2.h"   /* This file requires sm1 object description. */  #include "oxmisc2.h"   /* This file requires sm1 object description. */
 #include "cmo.h"  #include "cmo.h"
Line 383  struct object KoxIsThereErrorClient(struct object ob)
Line 385  struct object KoxIsThereErrorClient(struct object ob)
 int oxClientToObject(oxclientp client,struct object rob)  int oxClientToObject(oxclientp client,struct object rob)
 {  {
   struct object ob = OINIT;    struct object ob = OINIT;
   if (client == NULL) return;    if (client == NULL) return 0;
   /* rob = newObjectArray(N_OF_CLIENT_FIELDS); */    /* rob = newObjectArray(N_OF_CLIENT_FIELDS); */
   if (rob.tag != Sarray) {    if (rob.tag != Sarray) {
     errorOxmisc2("oxClientToObject(): the second argument must be an array.");      errorOxmisc2("oxClientToObject(): the second argument must be an array.");
Line 657  struct object KoxWatch(struct object client,struct obj
Line 659  struct object KoxWatch(struct object client,struct obj
     }else{      }else{
       WatchStream = 0;        WatchStream = 0;
     }      }
     return;      return rob;
   }    }
   if (cc1 == NULL) {    if (cc1 == NULL) {
     cc1 = (oxclientp) mymalloc(sizeof(oxclient));      cc1 = (oxclientp) mymalloc(sizeof(oxclient));
Line 759  struct object KoxCloseClient(struct object client) {
Line 761  struct object KoxCloseClient(struct object client) {
   switch (cc1->type) {    switch (cc1->type) {
   case CLIENT_SOCKET:    case CLIENT_SOCKET:
     fp2fclose(cc1->datafp2);      fp2fclose(cc1->datafp2);
     close(cc1->controlfd);      {int r; r=close(cc1->controlfd);}
     break;      break;
   case CLIENT_FILE:    case CLIENT_FILE:
     fp2fclose(cc1->datafp2);      fp2fclose(cc1->datafp2);
     close(cc1->controlfd);      {int r; r=close(cc1->controlfd);}
     break;      break;
   default:    default:
     errorOxmisc2("Unknown client->type\n");      errorOxmisc2("Unknown client->type\n");
Line 1101  int KgetCmoTagOfObject(struct object obj) {
Line 1103  int KgetCmoTagOfObject(struct object obj) {
   return(k);    return(k);
 }  }
   
 errorOxmisc2(char *s) {  int errorOxmisc2(char *s) {
   SET_MYERROROUT;    SET_MYERROROUT;
   fprintf(MyErrorOut,"error in oxmisc2.c: %s\n",s);    fprintf(MyErrorOut,"error in oxmisc2.c: %s\n",s);
   errorKan1("%s\n","  ");    errorKan1("%s\n","  ");
     return 0;
 }  }
   
 struct object KoxPushCMD(struct object client,struct object cmd) {  struct object KoxPushCMD(struct object client,struct object cmd) {
Line 1258  oxclientp oxCreateControl_RFC_101(int fdstream,int por
Line 1261  oxclientp oxCreateControl_RFC_101(int fdstream,int por
   /* Authentication by password. */    /* Authentication by password. */
   m = strlen(pass);    m = strlen(pass);
   s = (char *)mymalloc(sizeof(char)*(m+1));    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) {    if (strcmp(s,pass) != 0) {
     fprintf(stderr,"oxCreateControl_RFC_101(): password authentication failed for control channel.\n");      fprintf(stderr,"oxCreateControl_RFC_101(): password authentication failed for control channel.\n");
     close(fdStream);      {int r; r=close(fdStream);}
     return(NULL);      return(NULL);
   }    }
   

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.28

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>