View | Details | Raw Unified | Return to bug 1050
Collapse All | Expand All

(-)a/src/emu/model/emu-net-device.cc (-1 / +3 lines)
 Lines 548-554    Link Here 
548
      // so we call it "control."
548
      // so we call it "control."
549
      //
549
      //
550
      size_t msg_size = sizeof(int);
550
      size_t msg_size = sizeof(int);
551
      char control[CMSG_SPACE(msg_size)];
551
      char* control = new char[CMSG_SPACE(msg_size)];
552
552
553
      //
553
      //
554
      // There is a msghdr that is used to minimize the number of parameters
554
      // There is a msghdr that is used to minimize the number of parameters
 Lines 601-606    Link Here 
601
                  int *rawSocket = (int*)CMSG_DATA (cmsg);
601
                  int *rawSocket = (int*)CMSG_DATA (cmsg);
602
                  NS_LOG_INFO ("Got the socket from the socket creator = " << *rawSocket);
602
                  NS_LOG_INFO ("Got the socket from the socket creator = " << *rawSocket);
603
                  m_sock = *rawSocket;
603
                  m_sock = *rawSocket;
604
                  delete[] control;
604
                  return;
605
                  return;
605
                }
606
                }
606
              else
607
              else
 Lines 609-614    Link Here 
609
                }
610
                }
610
	    }
611
	    }
611
	}
612
	}
613
      delete[] control;
612
      NS_FATAL_ERROR ("Did not get the raw socket from the socket creator");
614
      NS_FATAL_ERROR ("Did not get the raw socket from the socket creator");
613
    }
615
    }
614
}
616
}
(-)a/src/emu/model/emu-sock-creator.cc (-1 / +2 lines)
 Lines 131-137    Link Here 
131
  // so we call it "control."
131
  // so we call it "control."
132
  //
132
  //
133
  size_t msg_size = sizeof(int);
133
  size_t msg_size = sizeof(int);
134
  char control[CMSG_SPACE(msg_size)];
134
  char* control = new char[CMSG_SPACE (msg_size)];
135
135
136
  //
136
  //
137
  // There is a msghdr that is used to minimize the number of parameters
137
  // There is a msghdr that is used to minimize the number of parameters
 Lines 186-191    Link Here 
186
  // Actually send the file descriptor back to the emulated net device.
186
  // Actually send the file descriptor back to the emulated net device.
187
  //
187
  //
188
  ssize_t len = sendmsg(sock, &msg, 0);
188
  ssize_t len = sendmsg(sock, &msg, 0);
189
  delete[] control;
189
  ABORT_IF (len == -1, "Could not send socket back to emu net device", 1);
190
  ABORT_IF (len == -1, "Could not send socket back to emu net device", 1);
190
191
191
  LOG ("sendmsg complete");
192
  LOG ("sendmsg complete");

Return to bug 1050