[Olsr-cvs] olsrd-current/lib/httpinfo/src admin_interface.c, 1.6, 1.7 olsrd_httpinfo.c, 1.58, 1.59

Andreas T�nnesen (spam-protected)
Mon Sep 18 20:55:32 CEST 2006


Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1191/src

Modified Files:
	admin_interface.c olsrd_httpinfo.c 
Log Message:
Fixed various bugs related to NETDIRECT stuff in httpinfo plugin

Index: olsrd_httpinfo.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** olsrd_httpinfo.c	7 Jan 2006 08:17:43 -0000	1.58
--- olsrd_httpinfo.c	18 Sep 2006 18:55:30 -0000	1.59
***************
*** 1192,1196 ****
      }
  
!   size += olsrd_write_cnf_buf(olsr_cnf, &buf[size], bufsize-size);
    
    if(size < 0)
--- 1192,1207 ----
      }
  
! #ifdef NETDIRECT
!     {
!         /* Hack to make netdirect stuff work with
!            olsrd_write_cnf_buf
!         */
!         char tmpBuf[10000];
!         size = olsrd_write_cnf_buf(olsr_cnf, tmpBuf, 10000);
!         sprintf(&buf[size], tmpBuf);
!     }
! #else
!   size += olsrd_write_cnf_buf(olsr_cnf, &buf[size], bufsize - size);
! #endif
    
    if(size < 0)
***************
*** 1205,1209 ****
        i++;
      }
!  
    return size;
  }
--- 1216,1220 ----
        i++;
      }
!   printf("RETURNING %d\n", size);
    return size;
  }

Index: admin_interface.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/admin_interface.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** admin_interface.c	29 May 2005 12:47:41 -0000	1.6
--- admin_interface.c	18 Sep 2006 18:55:30 -0000	1.7
***************
*** 54,57 ****
--- 54,61 ----
  #include <stdlib.h>
  
+ extern int netsprintf(char *str, const char* format, ...);
+ #define sprintf netsprintf
+ #define NETDIRECT
+ 
  int
  build_admin_body(char *buf, olsr_u32_t bufsize)





More information about the Olsr-cvs mailing list