Diff for /libaitio/example/test_sess.c between versions 1.2 and 1.2.2.1

version 1.2, 2013/03/13 14:54:38 version 1.2.2.1, 2013/03/19 17:06:57
Line 1 Line 1
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
   #include <elwix.h>
 #include <aitsess.h>  #include <aitsess.h>
   
 int main()  int main()
 {  {
        ait_sess_t *n = NULL;        sess_t *n = NULL;
         int i = 255;          int i = 255;
         char *dat, szVal[256];          char *dat, szVal[256];
           ait_val_t *v = NULL;
                   
         /*          /*
         map_createSession("/tmp/abra-kadabra-123", 1003, 4096, &n);          map_createSession("/tmp/abra-kadabra-123", 1003, 4096, &n);
Line 44  int main() Line 46  int main()
         if (!dat)          if (!dat)
                 return 1;                  return 1;
 //      sess_SetValue(n, "piuk_gniah++", "mryyynnnnn");  //      sess_SetValue(n, "piuk_gniah++", "mryyynnnnn");
        printf(">>> String=%s\n", n->addr);        printf(">>> String=%s\n", n->sess_addr);
         getchar();          getchar();
        printf("12345678 Define? %d\n", ISDEF(sess_GetValue(n, "12345678", szVal, &i)));        printf("12345678 Define? %d\n", ISDEF(sess_GetValue(n, "12345678", &v)));
         printf("111 Define? %d\n", ISDEF(sess_SetValue(n, "111", "321")));          printf("111 Define? %d\n", ISDEF(sess_SetValue(n, "111", "321")));
         printf("88 Define? %d\n", ISDEF(sess_GetValue(n, "88", szVal, &i)));          printf("88 Define? %d\n", ISDEF(sess_GetValue(n, "88", szVal, &i)));
         printf("222 find=%d value=%s vlen=%d\n", ISDEF(sess_SetValue(n, "222", NULL)));          printf("222 find=%d value=%s vlen=%d\n", ISDEF(sess_SetValue(n, "222", NULL)));

Removed from v.1.2  
changed lines
  Added in v.1.2.2.1


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