summaryrefslogtreecommitdiff
path: root/src/netops.c
Commit message (Collapse)AuthorAgeFilesLines
...
* netops: abstract away socket closingCarlos Martín Nieto2011-10-011-0/+12
| | | | | | | Winsock wants us to use closesocket() instead of close(), so introduce the gitno_close function, which does the right thing. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Initialise the winsock DLLCarlos Martín Nieto2011-10-011-3/+9
| | | | | | | | Windows wants us to initialise the networking DLL before we're allowed to send data through a socket. Call WSASetup and WSACleanup if GIT_WIN32 is defined. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* netops: Use pragmas only in MSVCVicent Marti2011-09-291-9/+11
|
* Merge pull request #405 from carlosmn/http-lsVicent Martí2011-09-221-2/+33
|\ | | | | Implement ls-remote over HTTP
| * netops: store the error if gitno_send failsCarlos Martín Nieto2011-09-091-1/+1
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * netops: don't try to free addrinfo on DNS errorCarlos Martín Nieto2011-09-091-0/+1
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * netops: get rid of the len - 1 limitationCarlos Martín Nieto2011-09-091-1/+1
| | | | | | | | | | | | | | This was as a result of the pkt code using string functions where they shouldn't. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * Move extract_host_and_port to netops and add default port argumentCarlos Martín Nieto2011-09-041-0/+30
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Cleanup legal dataVicent Marti2011-09-191-21/+3
|/ | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* netops: Use the size_t, LukeVicent Marti2011-08-301-5/+7
|
* Fix Windows compilationCarlos Martín Nieto2011-08-301-0/+16
| | | | | | | | | Sockets on Windows are unsigned, so define a type GIT_SOCKET which is signed or unsigned depending on the platform. Thanks to Em for his patience with this. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Actually implement object negotiationCarlos Martín Nieto2011-08-181-1/+1
| | | | | | | | Only signal that we need a pack if we do need it and don't send a want just because it's the first. If we don't need to download the pack, then we can skip all of the negotiation and just return success. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Fix network MSYS compilationCarlos Martín Nieto2011-07-061-1/+2
| | | | | | | | | | | | | MSYS/MinGW uses winsock but obviously doesn't set _MSC_VER. Use _WIN32 to decide whether to use winsock or BSD headers. Also remove these headers from src/transport_git.c altogether, as they are not needed. MSYS is very conservative, so we have to tell it that we don't care about versions of Windows lower than WindowsXP. We also need to tell CMake to add ws2_32 to the libraries list and we shouldn't add the -fPIC option, to MSYS because it complains that it does it anyway. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Use gitno_buffer in the git transportCarlos Martín Nieto2011-06-271-7/+7
| | | | | | This allows us to leave out the buffer handling logic. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add gitno_buffer as a recv wrapperCarlos Martín Nieto2011-06-271-0/+47
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Implement and use gitno_sendCarlos Martín Nieto2011-06-261-3/+24
|
* Create netops and start moving git:// to itCarlos Martín Nieto2011-06-261-0/+76
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>