@@ -44,27 +44,6 @@ sigset_t orig_mask;
4444static int hyper_handle_exit (struct hyper_pod * pod );
4545static int hyper_ctl_append_msg (struct hyper_event * he , uint32_t type , uint8_t * data , uint32_t len );
4646
47- int hyper_send_pod_finished (struct hyper_pod * pod )
48- {
49- struct hyper_container * c ;
50- uint8_t * data = NULL , * new ;
51- int c_num = 0 ;
52-
53- list_for_each_entry (c , & pod -> containers , list ) {
54- c_num ++ ;
55- new = realloc (data , c_num * 4 );
56- if (new == NULL ) {
57- free (data );
58- return -1 ;
59- }
60-
61- hyper_set_be32 (new + ((c_num - 1 ) * 4 ), c -> exec .code );
62- data = new ;
63- }
64-
65- return hyper_ctl_append_msg (& hyper_epoll .ctl , PODFINISHED , data , c_num * 4 );
66- }
67-
6847static int hyper_set_win_size (char * json , int length )
6948{
7049 struct winsize size ;
@@ -1118,10 +1097,6 @@ static int hyper_ctlmsg_handle(struct hyper_event *he, uint32_t len)
11181097 ret = hyper_start_pod ((char * )buf -> data + 8 , len - 8 );
11191098 hyper_print_uptime ();
11201099 break ;
1121- case STOPPOD_DEPRECATED :
1122- fprintf (stderr , "get abandoned STOPPOD message\n" );
1123- ret = -1 ;
1124- break ;
11251100 case DESTROYPOD :
11261101 pod -> req_destroy = 1 ;
11271102 fprintf (stdout , "get DESTROYPOD message\n" );
@@ -1137,7 +1112,6 @@ static int hyper_ctlmsg_handle(struct hyper_event *he, uint32_t len)
11371112 ret = hyper_cmd_rw_file ((char * )buf -> data + 8 , len - 8 , & datalen , & data , READFILE );
11381113 break ;
11391114 case PING :
1140- case GETPOD :
11411115 break ;
11421116 case READY :
11431117 ret = hyper_rescan ();
@@ -1163,6 +1137,14 @@ static int hyper_ctlmsg_handle(struct hyper_event *he, uint32_t len)
11631137 case SETUPROUTE :
11641138 ret = hyper_cmd_setup_route ((char * )buf -> data + 8 , len - 8 );
11651139 break ;
1140+ case GETPOD_DEPRECATED :
1141+ case STOPPOD_DEPRECATED :
1142+ case RESTARTCONTAINER_DEPRECATED :
1143+ case CMDFINISHED_DEPRECATED :
1144+ case PODFINISHED_DEPRECATED :
1145+ fprintf (stderr , "get abandoned command\n" );
1146+ ret = -1 ;
1147+ break ;
11661148 default :
11671149 ret = -1 ;
11681150 break ;
0 commit comments