Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 0470974

Browse files
authored
Merge pull request #212 from laijs/non-error-msg
don't send non-error message to stderr
2 parents 66bcaed + 3293eaa commit 0470974

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ int hyper_handle_event(int efd, struct epoll_event *event)
179179
}
180180

181181
if (event->events & EPOLLERR) {
182-
fprintf(stderr, "get epoll err of not epool in event\n");
182+
fprintf(stdout, "get epoll err on event: %p\n", he);
183183
if (he->ops->hup)
184184
he->ops->hup(he, efd);
185185
return 0;

src/net.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,9 @@ void hyper_cleanup_dns(struct hyper_pod *pod)
915915
{
916916
int fd, i;
917917

918+
if (pod->dns == NULL)
919+
return;
920+
918921
for (i = 0; i < pod->d_num; i++) {
919922
free(pod->dns[i]);
920923
}

src/util.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ int hyper_open_channel(char *channel, int mode)
538538
fd = -1;
539539

540540
if (strncmp(name, channel, strlen(channel))) {
541-
fprintf(stderr, "channel %s, directory %s\n", channel, name);
542541
continue;
543542
}
544543

0 commit comments

Comments
 (0)