diff src/recpt1.c @ 166:726fe10d9e4a

Code refactoring. Change channel shuld be done in http_open(). Delete unnecessary code, variables.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Tue, 02 Oct 2012 21:57:40 +0900
parents 7d8a5bb874ad
children 061ef2cd98f0
line wrap: on
line diff
--- a/src/recpt1.c	Mon Oct 01 21:53:24 2012 +0900
+++ b/src/recpt1.c	Tue Oct 02 21:57:40 2012 +0900
@@ -602,9 +602,6 @@
     splitbuf_t splitbuf;
     ARIB_STD_B25_BUFFER sbuf, dbuf, buf;
     int code;
-    pt1_message_buf mbuf;
-    int msqid;
-    int msgflg = IPC_CREAT | 0666;
 
     if (use_splitter)
         time(&data->splitter->split_start_time);
@@ -714,39 +711,6 @@
          * DLNA $B$G$NJ*M}%A%c%s%M%k!&(BSID$BJQ99$N<BAu<B83(B
          */
         if ( use_dlna && buf.size > 0 ) {
-            if (use_splitter && (ut->tp) && (ut->sid)) {
-                if (strcmp(data->ch, ut->tp) ||
-                    strcmp(data->sid_list, ut->sid)) {
-                    if ((msqid = msgget((key_t)getpid(), msgflg)) < 0) {
-                        // $B%(%i!<;~$O%A%c%s%M%kJQ99%j%/%(%9%H$O$J$+$C$?$3$H$K$9$k(B
-                        // $B$J$`$J$`(B
-                        fprintf(stderr, "msgget error.\n");
-                        ut->tp  = data->ch;
-                        free(qbuf);
-                        qbuf = NULL;
-                        ut->sid = data->sid_list;
-                        continue;
-                    }
-
-                    mbuf.mtype = 1;
-                    snprintf(mbuf.mtext, sizeof(mbuf.mtext),
-                             "ch=%s t=%d e=%d i=%s",
-                              ut->tp, 0, 0, ut->sid);
-                    if (msgsnd(msqid, &mbuf, strlen(mbuf.mtext)+1, IPC_NOWAIT) < 0) {
-                        // $B%(%i!<;~$O%A%c%s%M%kJQ99%j%/%(%9%H$O$J$+$C$?$3$H$K$9$k(B
-                        // $B$J$`$J$`(B
-                        fprintf(stderr, "msgsend error.\n");
-                        ut->tp  = data->ch;
-                        ut->sid = data->sid_list;
-                        free(qbuf);
-                        qbuf = NULL;
-                        continue;
-                    }
-                    free(qbuf);
-                    qbuf = NULL;
-                    continue;
-                }
-            }
             do {
                 eqbuf = malloc(sizeof(ARIB_STD_B25_BUFFER));
                 if ( eqbuf == NULL ) {