Changeset 467d2b9 in mainline for uspace/lib/pcap/src/pcap_dumper.c
- Timestamp:
- 2024-12-13T08:44:05Z (14 months ago)
- Children:
- e1e8f7a
- Parents:
- f161ce1
- git-author:
- Nataliia Korop <n.corop08@…> (2024-11-10 18:34:17)
- git-committer:
- Nataliia Korop <n.corop08@…> (2024-12-13 08:44:05)
- File:
-
- 1 edited
-
uspace/lib/pcap/src/pcap_dumper.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcap/src/pcap_dumper.c
rf161ce1 r467d2b9 36 36 #include <errno.h> 37 37 #include <str.h> 38 #include <io/log.h> 38 39 #include "pcap_dumper.h" 39 40 40 41 /** Initialize writing to .pcap file. 41 42 * 42 * @param writer Interface for working with .pcap file 43 * @param filename Name of the file for dumping packets 44 * @return EOK on success or an error code 43 * @param writer Interface for working with .pcap file. 44 * @param filename Name of the file for dumping packets. 45 * @return EOK on success or an error code. 45 46 * 46 47 */ … … 126 127 pcap_dumper_stop(dumper); 127 128 } 129 128 130 errno_t rc = dumper->writer.ops->open(&dumper->writer, name); 129 131 if (rc == EOK) { 130 132 dumper->to_dump = true; 131 } else { 132 printf("Failed creating pcap dumper: %s", str_error(rc)); 133 } 133 } 134 134 135 fibril_mutex_unlock(&dumper->mutex); 135 136 return rc; … … 188 189 dumper->to_dump = false; 189 190 dumper->writer.ops = NULL; 191 192 errno_t rc = log_init("pcap"); 193 if (rc != EOK) { 194 printf("pcap : Failed to initialize log.\n"); 195 return 1; 196 } 190 197 return EOK; 191 198 }
Note:
See TracChangeset
for help on using the changeset viewer.
