parser seems to work
[sip-router] / main.c
diff --git a/main.c b/main.c
index d07bd80..564dfd5 100644 (file)
--- a/main.c
+++ b/main.c
 #define CFG_FILE "./sip_router.cfg"
 
 
+/* debuging function */
+
+void receive_stdin_loop()
+{
+       #define BSIZE 1024
+       char buf[BSIZE+1];
+       int len;
+       
+       while(1){
+               len=fread(buf,1,BSIZE,stdin);
+               buf[len+1]=0;
+               receive_msg(buf, len);
+               printf("-------------------------\n");
+       }
+}
+
+
+
 int main(int argc, char** argv)
 {
 
@@ -40,10 +58,12 @@ int main(int argc, char** argv)
 
 
 
-       /* start other processes/threads ? */
+       /* start/init other processes/threads ? */
 
        /* receive loop */
 
+       receive_stdin_loop();
+
 
 error:
        return -1;