ref: d63fbe6cd5e055b40ae8e4aa209b9aef07074f8b
parent: 489c503c2594f88d29d50b788915cf1ba74f66ac
author: rodri <[email protected]>
date: Wed Aug 2 07:52:57 EDT 2023
wrote a readme. removed unnecessary Hdr**.
--- a/main.c
+++ b/main.c
@@ -7,6 +7,27 @@
int debug;
+//Channel *ingress;
+//Channel *egress;
+//
+//
+//void
+//threadnetrecv(void *arg)
+//{
+//
+//}
+//
+//void
+//threadnetppu(void *)
+//{
+//
+//}
+//
+//void
+//threadnetsend(void *arg)
+//{
+//
+//}
void
usage(void)
@@ -40,9 +61,15 @@
fd = dial(addr, nil, nil, nil);
if(fd < 0)
sysfatal("couldn't establish the connection");
-
- if(debug)
+ else if(debug)
fprint(2, "connection established\n");
+
+// ingress = chancreate(sizeof(Sipmsg*), 8);
+// egress = chancreate(sizeof(Sipmsg*), 8);
+// threadcreate(threadnetrecv, &fd, mainstacksize);
+// threadcreate(threadnetppu, nil, mainstacksize);
+// threadcreate(threadnetsend, &fd, mainstacksize);
+// yield();
sip = mksip(fd);
if(sip == nil)
--- a/readme.md
+++ b/readme.md
@@ -1,0 +1,25 @@
+# Catphone
+
+A VoIP softphone operated by a cat.
+
+## Roadmap
+
+- [ ] SIP
+ - [x] REGISTER
+ - [x] MD5
+ - [ ] SHA-2
+ - [ ] INVITE
+- [ ] SDP
+- [ ] RTP/RTCP
+- [ ] Codecs
+ - [ ] G.711
+ - [ ] PCMU (µ-law)
+ - [ ] PCMA (a-law)
+
+## References
+
+- rfc3261 - SIP: Session Initiation Protocol
+- rfc8760 - The Session Initiation Protocol (SIP) Digest Access Authentication Scheme
+- rfc5626 - Managing Client-Initiated Connections in the Session Initiation Protocol (SIP)
+- rfc8866 - SDP: Session Description Protocol
+- rfc3264 - An Offer/Answer Model with the Session Description Protocol (SDP)
--- a/sip.c
+++ b/sip.c
@@ -318,19 +318,19 @@
void
delheader(Hdrtab *ht, char *name)
{
- Hdr **h, *nh;
+ Hdr *h, *nh;
uint key;
key = hash(name);
- h = &ht->headers[key];
- while(*h != nil){
- nh = (*h)->next;
- if(cistrcmp((*h)->name, name) == 0){
- free((*h)->name);
- free((*h)->value);
- free(*h);
+ h = ht->headers[key];
+ while(h != nil){
+ nh = h->next;
+ if(cistrcmp(h->name, name) == 0){
+ free(h->name);
+ free(h->value);
+ free(h);
}
- *h = nh;
+ h = nh;
}
}